﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DTO;
using DAO;
namespace BUS
{
    public class ChiTietHoaDonBUS
    {
        // ------------- LOI --------------------------
        public List<ChiTietHoaDonDTO> DanhSachChiTietHoaDonL()
        {

            ChiTietHoaDonDAO ctDAO = new ChiTietHoaDonDAO();
            return ctDAO.DanhSachChiTietHoaDonL();
        }
        public string ThemChiTietHoaDonL(ChiTietHoaDonDTO ctDTO)
        {
            ChiTietHoaDonDAO ctDAO = new ChiTietHoaDonDAO();
            return ctDAO.ThemChiTietHoaDonL(ctDTO);
        }
        public int LayMaChiTietHoaDonL()
        {
            ChiTietHoaDonDAO ctDAO = new ChiTietHoaDonDAO();
            return ctDAO.LayMaChiTietHoaDonL();
        }
        public string XoaChiTietHoaDonL(int maCT)
        {
            ChiTietHoaDonDAO ctDAO = new ChiTietHoaDonDAO();
            return ctDAO.XoaChitietHoaDonL(maCT);
        }
        public List<MatHangDTO> DanhSachMatHangTheoMaHoaDonL(int maHD)
        {
            ChiTietHoaDonDAO ctDAO = new ChiTietHoaDonDAO();
            return ctDAO.DanhSachMatHangTheoMaHoaDonL(maHD);
        }
        // END ----------------- LOI -----------------------------
    }
}
